//
//  AppDelegate.m
//  MyMovie
//
//  Created by apple on 16/5/10.
//  Copyright © 2016年 ljp. All rights reserved.
//

#import "AppDelegate.h"
#import "CustomTabBarController.h"
#import "LaunchViewController.h"
#import "FirstLaunchViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //window的创建
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

    //设置self.window为keyWindows并显示
    [self.window makeKeyAndVisible];


    NSUserDefaults *userDefaults = [[NSUserDefaults alloc] init];

    NSString *key = @"notFirstLaunchApp";

    id object = [userDefaults objectForKey:key];

    if (object) {
        self.window.rootViewController = [[LaunchViewController alloc] init];
    }else {

        self.window.rootViewController = [[FirstLaunchViewController alloc] init];
    }












    return YES;
}


@end
